package com.rc.saas.tenant.service.printer;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.printer.ElecPrinterMapper;
import com.rc.saas.tenant.model.printer.ElecPrinter;
import com.rc.saas.tenant.vo.elecPrinter.ElecPrinterSearch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Create by Yang on 2021/7/28
 */
@Service
public class ElecPrinterServiceImpl implements ElecPrinterService {

    @Autowired
    private ElecPrinterMapper elecPrinterMapper;

    @Override
    public ElecPrinterMapper getMapper() {
        return elecPrinterMapper;
    }

    @Override
    public PageInfo<ElecPrinter> listElecPrinter(ElecPrinterSearch elecPrinterVO) {
        PageHelper.startPage(elecPrinterVO.getOffset(), elecPrinterVO.getLimit());
        List<ElecPrinter> elecPrinters = elecPrinterMapper.listElecPrinter(elecPrinterVO);
        return new PageInfo<ElecPrinter>(elecPrinters);
    }

    @Override
    public List<ElecPrinter> exportElecPrinter(ElecPrinterSearch elecPrinterVO) {
        return elecPrinterMapper.exportElecPrinter(elecPrinterVO);
    }
}
